package com.rd.student.ruanjian.class3.gaochenxi.LianXi3.NumberFive;

import java.util.Scanner;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

//线程池方式
public class Number_Alghter {
   public static void main(String[] args) {
      ExecutorService service = Executors.newSingleThreadExecutor();
      int[] num = {1};
      char[] c = {'A'};
      for (int i = 0; i < 26; i++) {
         service.execute(new Runnable() {
            @Override
            public void run() {
               if (num[0] <= 52) {
                  System.out.print(num[0]);
                  num[0]++;
                  System.out.print(num[0]);
                  num[0]++;
               }
            }
         });

         service.execute(new Runnable() {

            @Override
            public void run() {
               if (c[0] <= 'Z') {
                  System.out.print(c[0]);
               }
               c[0]++;
            }
         });
      }
      service.shutdown();
   }
}
